package com.common.singleton;

/**
 * 懒汉模式:线程安全,但是性能不好
 * Created by Administrator on 2018-9-13 0013.
 */
public class SingletonLazySafe {

    private static SingletonLazySafe instance = null;

    private SingletonLazySafe(){}

    public static synchronized SingletonLazySafe getInstance(){
        if (instance == null) {
            instance = new SingletonLazySafe();
        }
        return instance;
    }

}
